<?php

namespace app\admin\validate;

use think\Validate;

class SGroup extends Validate
{
    protected $rule = [
        'goods_id'=>'require',
        'group_name'=> 'require',
        'group_desc'=> 'require',
        'time'=> 'require',
        'pay_count'=>'require|number',
        'once_pay_count'=>'require|number',
        'action_status'=>["require","in"=>"0,1"]
    ];

    protected $message = [
        'goods_id'=> '商品id必须',
        'group_name'=> '拼团名称必须',
        'group_desc'=> '拼团简介必须',
        'time'=> '拼团时效必须',
        'pay_count.require'=>'总购买数量限制必须',
        'pay_count.number'=>'总购买数量限制必须为数字',
        'once_pay_count.require'=>'单次购买数量限制必须',
        'once_pay_count.number'=>'单次购买数量限制必须为数字',
        'action_status.require'=>'活动状态必须',
        'action_status.in'=>'活动状态数值错误',
    ];
}
